import { axios } from '@/utils/request'

export function getSysParkList(params) {
  return axios({
    url: '/sys/park/pageQueryPark',
    method: 'get',
    params
  })
}
export function getSysParkAdd(parameter) {
  return axios({
    url: '/sys/park/add',
    method: 'post',
    data:parameter
  })
}
export function getSysParkEdit(parameter) {
  return axios({
    url: '/sys/park/update',
    method: 'post',
    data:parameter
  })
}
export function getSysParkDetails(id) {
    id = id !== undefined ? id : '';
    return axios({
        url:`/sys/park/detail?id=${id}`,
        method: 'get',
    })
}
export function getSysParkEnable(parameter) {
  return axios({
    url: '/sys/park/disOrEnable',
    method: 'post',
    data:parameter
  })
}
export function getSysAllParkEnable() {
  return axios({
    url: '/sys/park/listAllEnabledParks',
    method: 'get'
  })
}
export function sysGetParkIdInfo(parkId) {
    parkId = parkId !== undefined ? parkId : '';
    return axios({
        url:`/sys/park/detailByParkId?parkId=${parkId}`,
        method: 'get',
    })
}
export function parkIdGetEnterpriseList(parameter) {
    return axios({
        url:'/sys/pt/park/queryParksAssociationEnterprise',
      method: 'post',
        data:parameter
    })
}
export function getParkEnterpriseDetail(enterpriseId) {
   return axios({
    url: '/sys/pt/park/queryParkAssociationEnterpriseDetail?enterpriseId='+enterpriseId,
    method: 'get',
  })
}